package com.example.opengldemo.simple13_01;

import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorAdditionalInfo;
import android.hardware.SensorEvent;
import android.hardware.SensorEventCallback;
import android.hardware.SensorEventListener;
import android.hardware.SensorEventListener2;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.opengldemo.R;

public class MySeneorActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sensor_select);


        findViewById(R.id.TYPE_ACCELEROMETER).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , ACCELEROMETERActivity.class) ;
                startActivity(intent);
            }
        });
        findViewById(R.id.TYPE_MAGNETIC_FIELD).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , MAGNETICActivity.class) ;
                startActivity(intent);
            }
        });
        findViewById(R.id.TYPE_GYROSCOPE).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , GYROSCOPEActivity.class) ;
                startActivity(intent);
            }
        });
        findViewById(R.id.TYPE_LIGHT).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , LIGHTActivity.class) ;
                startActivity(intent);
            }
        });
        findViewById(R.id.TYPE_TEMPERATURE).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , TEMPERATUREActivity.class) ;
                startActivity(intent);
            }
        });
        findViewById(R.id.TYPE_PROXIMITY).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , PROXIMITYActivity.class) ;
                startActivity(intent);
            }
        });
        findViewById(R.id.TYPE_ORIENTATION).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent() ;
                intent.setClass(MySeneorActivity.this , ORIENTATIONActivity.class) ;
                startActivity(intent);
            }
        });


    }
}
